/*
 * @Author:张晨旭
 * @Date: 2021-04-21 16:22:33
 * @LastEditTime: 2021-04-26 16:01:42
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \riboa\daily-1807a-6\项目代码\project2\wipi\src\store\modules\file.ts
 */

import {getList,getHeaderList,getFile,getdetail } from "@/seivers/Archive"
import {makeAutoObservable} from "mobx"
import {Datum,Data} from '@/utils/file'
 

class file{
    constructor(){
        makeAutoObservable(this)
    }
    // ListAll:Datum[] = []
    List:Datum[] = []
    FileList:Data = {}
    Detail:any = {}
    page = 1
    // async getLerList(){
    //     let res = await getLerList();
    //     if(res.statusCode === 200){
    //         this.ListAll = res.data
    //     }
    // }
    
    async getHeaderList(){
        let res = await getHeaderList();
    }

    async getList(){
        let res = await getList();
        if(res.statusCode === 200){
            this.List = res.data
        }
    }

    async getFile(){
        let res = await getFile();
        if(res.statusCode === 200){
            this.FileList = res.data
        }
    }
 
    async getdetail (id:string){
        let res = await getdetail (id);
        if(res.statusCode === 200){
            this.Detail = res.data
            // console.log(res.data)
        }
    }
}
export default file